package com.crocodileQ.enums;

/**
 * 异常信息枚举类
 */
public enum AppExceptionMsgEnum {

    //成功
    SUCCESS(200,"操作成功"),
    //失败
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATION_AUTH(403,"无权限操作"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONE_NUMBER_EXITS(502,"手机号已存在"),
    EMAIL_EXIST(503,"邮箱已存在"),
    REQUIRED_USERNAME(504,"必须填写用户名"),
    LOGIN_ERROR(505," 用户名或密码错误"),
    WRONG_PAGE_PARAM(506,"wrong page param"),
    CONTENT_NOT_NULL(507,"评论内容不能为空"),
    FILENAME_ERROR(508,"上传文件错误"),
    ONLY_UPDATE_SELF(509,"只能修改自己的信息"),
    SERVER_ERROR(500,"SERVER ERROR")
    ;
    private int status;
    private String msg;

    AppExceptionMsgEnum(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }
}
